﻿using System;

namespace SlamCms.DomainEvents
{
	public interface IEventDispatcher
	{
		void Dispatch<T>(T domainEvent) where T : IDomainEvent;
		void AddHandler<T>(Action<EventContext<T>> handler) where T : IDomainEvent;
		void AddHandler<T>(IDomainEventHandler<T> handler) where T : IDomainEvent;
		void ClearHandlers();
		void ClearHandlers<T>() where T : IDomainEvent;
	}
}
